cryptonite is not maintained and has security problems.
Debian stable includes crypton by now.
, ("bloomfilter", VERSION_bloomfilter)
, ("http-client", VERSION_http_client)
, ("persistent-sqlite", VERSION_persistent_sqlite)
-#ifdef WITH_CRYPTON
, ("crypton", VERSION_crypton)
-#else
- , ("cryptonite", VERSION_cryptonite)
-#endif
, ("aws", VERSION_aws)
, ("DAV", VERSION_DAV)
#ifdef WITH_TORRENTPARSER
flag, these leaks can still happen.
* Improve performance when used with a local git remote that has a
large working tree.
+ * Removed support for building with cryptonite, use crypton.
-- Joey Hess <id@joeyh.name> Fri, 29 Aug 2025 12:34:06 -0400
-{- Convenience wrapper around cryptonite's hashing.
+{- Convenience wrapper around crypton's hashing.
-
- Copyright 2013-2024 Joey Hess <id@joeyh.name>
-
{-# LANGUAGE BangPatterns, PackageImports #-}
{-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE CPP #-}
module Utility.Hash (
sha1,
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.IORef
-#ifdef WITH_CRYPTON
import "crypton" Crypto.MAC.HMAC hiding (Context)
import "crypton" Crypto.Hash
-#else
-import "cryptonite" Crypto.MAC.HMAC hiding (Context)
-import "cryptonite" Crypto.Hash
-#endif
sha1 :: L.ByteString -> Digest SHA1
sha1 = hashlazy
libghc-split-dev,
libghc-data-default-dev,
libghc-hslogger-dev,
- libghc-cryptonite-dev,
+ libghc-crypton-dev,
libghc-memory-dev,
libghc-deepseq-dev,
libghc-attoparsec-dev,
Flag MagicMime
Description: Use libmagic to determine file MIME types
-Flag Crypton
- Description: Use the crypton library rather than the no longer maintained cryptonite
-
Flag Servant
Description: Use the servant library, enabling using annex+http urls and git-annex p2phttp
network (>= 3.0.0.0),
network-bsd,
git-lfs (>= 1.2.0),
- clock (>= 0.3.0)
+ clock (>= 0.3.0),
+ crypton
CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs -Wincomplete-uni-patterns
Default-Language: Haskell2010
if os(linux) || os(freebsd)
GHC-Options: -optl-Wl,--as-needed
- if flag(Crypton)
- Build-Depends: crypton
- CPP-Options: -DWITH_CRYPTON
- else
- Build-Depends: cryptonite (>= 0.23)
-
if flag(Servant)
Build-Depends:
servant,
dbus: false
debuglocks: false
benchmark: true
- crypton: true
servant: true
ospath: true
packages: